import 'package:flutter/material.dart';

class AppBranding {
  // 应用基本信息
  static const String appName = 'GameWiki Pro';
  static const String appSlogan = '探索游戏世界的终极指南';
  static const String appDescription = '专业的游戏百科应用，提供全面的游戏攻略、资讯和社区交流';
  
  // 版本信息
  static const String version = '2.0.0';
  static const String buildNumber = '1';
  
  // 主色调
  static const Color primaryColor = Color(0xFF6C5CE7);
  static const Color secondaryColor = Color(0xFFA29BFE);
  static const Color accentColor = Color(0xFF00CEC9);
  
  // 渐变色
  static const LinearGradient primaryGradient = LinearGradient(
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
    colors: [
      Color(0xFF6C5CE7),
      Color(0xFFA29BFE),
    ],
  );
  
  static const LinearGradient secondaryGradient = LinearGradient(
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
    colors: [
      Color(0xFF00CEC9),
      Color(0xFF55EFC4),
    ],
  );
  
  static const LinearGradient accentGradient = LinearGradient(
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
    colors: [
      Color(0xFFFF7675),
      Color(0xFFE17055),
    ],
  );
  
  static const LinearGradient darkGradient = LinearGradient(
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
    colors: [
      Color(0xFF2D3436),
      Color(0xFF636E72),
    ],
  );
  
  // 主题色彩选项
  static const List<Color> themeColors = [
    Color(0xFF6C5CE7), // 紫色
    Color(0xFF00CEC9), // 青色
    Color(0xFF0984E3), // 蓝色
    Color(0xFF00B894), // 绿色
    Color(0xFFE17055), // 橙色
    Color(0xFFFF7675), // 红色
    Color(0xFFFD79A8), // 粉色
    Color(0xFFE84393), // 洋红色
  ];
  
  // 文字颜色
  static const Color textPrimary = Color(0xFF2D3436);
  static const Color textSecondary = Color(0xFF636E72);
  static const Color textLight = Color(0xFFB2BEC3);
  static const Color textWhite = Colors.white;
  
  // 背景颜色
  static const Color backgroundLight = Color(0xFFFAFBFC);
  static const Color backgroundDark = Color(0xFF2D3436);
  static const Color surfaceLight = Colors.white;
  static const Color surfaceDark = Color(0xFF636E72);
  
  // 状态颜色
  static const Color successColor = Color(0xFF00B894);
  static const Color warningColor = Color(0xFFE17055);
  static const Color errorColor = Color(0xFFFF7675);
  static const Color infoColor = Color(0xFF0984E3);
  
  // 阴影
  static const List<BoxShadow> cardShadow = [
    BoxShadow(
      color: Color(0x1A000000),
      blurRadius: 8,
      offset: Offset(0, 2),
    ),
  ];
  
  static const List<BoxShadow> elevatedShadow = [
    BoxShadow(
      color: Color(0x26000000),
      blurRadius: 12,
      offset: Offset(0, 4),
    ),
  ];
  
  // 圆角
  static const double radiusSmall = 8.0;
  static const double radiusMedium = 12.0;
  static const double radiusLarge = 16.0;
  static const double radiusXLarge = 24.0;
  
  // 间距
  static const double spacingXSmall = 4.0;
  static const double spacingSmall = 8.0;
  static const double spacingMedium = 16.0;
  static const double spacingLarge = 24.0;
  static const double spacingXLarge = 32.0;
  
  // 字体大小
  static const double fontSizeCaption = 12.0;
  static const double fontSizeBody = 14.0;
  static const double fontSizeSubtitle = 16.0;
  static const double fontSizeTitle = 18.0;
  static const double fontSizeHeadline = 20.0;
  static const double fontSizeDisplay = 24.0;
  
  // 图标大小
  static const double iconSizeSmall = 16.0;
  static const double iconSizeMedium = 24.0;
  static const double iconSizeLarge = 32.0;
  static const double iconSizeXLarge = 48.0;
  
  // 应用栏高度
  static const double appBarHeight = 56.0;
  static const double appBarElevation = 0.0;
  
  // 底部导航栏
  static const double bottomNavHeight = 60.0;
  
  // 动画持续时间
  static const Duration animationFast = Duration(milliseconds: 200);
  static const Duration animationNormal = Duration(milliseconds: 300);
  static const Duration animationSlow = Duration(milliseconds: 500);
  
  // 获取主题数据
  static ThemeData getLightTheme() {
    return ThemeData(
      useMaterial3: true,
      colorScheme: ColorScheme.fromSeed(
        seedColor: primaryColor,
        brightness: Brightness.light,
      ),
      appBarTheme: const AppBarTheme(
        elevation: appBarElevation,
        centerTitle: true,
        backgroundColor: Colors.transparent,
        foregroundColor: textPrimary,
      ),
      cardTheme: CardTheme(
        elevation: 0,
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(radiusMedium),
        ),
        shadowColor: Colors.black.withOpacity(0.1),
      ),
      elevatedButtonTheme: ElevatedButtonThemeData(
        style: ElevatedButton.styleFrom(
          elevation: 0,
          padding: const EdgeInsets.symmetric(
            horizontal: spacingLarge,
            vertical: spacingMedium,
          ),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(radiusMedium),
          ),
        ),
      ),
      inputDecorationTheme: InputDecorationTheme(
        border: OutlineInputBorder(
          borderRadius: BorderRadius.circular(radiusMedium),
          borderSide: BorderSide.none,
        ),
        filled: true,
        fillColor: backgroundLight,
        contentPadding: const EdgeInsets.symmetric(
          horizontal: spacingMedium,
          vertical: spacingMedium,
        ),
      ),
      bottomNavigationBarTheme: const BottomNavigationBarThemeData(
        elevation: 0,
        backgroundColor: surfaceLight,
        selectedItemColor: primaryColor,
        unselectedItemColor: textSecondary,
        type: BottomNavigationBarType.fixed,
      ),
    );
  }
  
  static ThemeData getDarkTheme() {
    return ThemeData(
      useMaterial3: true,
      colorScheme: ColorScheme.fromSeed(
        seedColor: primaryColor,
        brightness: Brightness.dark,
      ),
      scaffoldBackgroundColor: backgroundDark,
      appBarTheme: const AppBarTheme(
        elevation: appBarElevation,
        centerTitle: true,
        backgroundColor: Colors.transparent,
        foregroundColor: textWhite,
      ),
      cardTheme: CardTheme(
        elevation: 0,
        color: surfaceDark,
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(radiusMedium),
        ),
      ),
      elevatedButtonTheme: ElevatedButtonThemeData(
        style: ElevatedButton.styleFrom(
          elevation: 0,
          padding: const EdgeInsets.symmetric(
            horizontal: spacingLarge,
            vertical: spacingMedium,
          ),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(radiusMedium),
          ),
        ),
      ),
      inputDecorationTheme: InputDecorationTheme(
        border: OutlineInputBorder(
          borderRadius: BorderRadius.circular(radiusMedium),
          borderSide: BorderSide.none,
        ),
        filled: true,
        fillColor: surfaceDark,
        contentPadding: const EdgeInsets.symmetric(
          horizontal: spacingMedium,
          vertical: spacingMedium,
        ),
      ),
      bottomNavigationBarTheme: const BottomNavigationBarThemeData(
        elevation: 0,
        backgroundColor: surfaceDark,
        selectedItemColor: primaryColor,
        unselectedItemColor: textLight,
        type: BottomNavigationBarType.fixed,
      ),
    );
  }
  
  // 获取渐变装饰
  static BoxDecoration getGradientDecoration({
    LinearGradient? gradient,
    double? radius,
    List<BoxShadow>? shadows,
  }) {
    return BoxDecoration(
      gradient: gradient ?? primaryGradient,
      borderRadius: BorderRadius.circular(radius ?? radiusMedium),
      boxShadow: shadows ?? cardShadow,
    );
  }
  
  // 获取卡片装饰
  static BoxDecoration getCardDecoration({
    Color? color,
    double? radius,
    List<BoxShadow>? shadows,
  }) {
    return BoxDecoration(
      color: color ?? surfaceLight,
      borderRadius: BorderRadius.circular(radius ?? radiusMedium),
      boxShadow: shadows ?? cardShadow,
    );
  }
  
  // 获取文本样式
  static TextStyle getTextStyle({
    double? fontSize,
    FontWeight? fontWeight,
    Color? color,
  }) {
    return TextStyle(
      fontSize: fontSize ?? fontSizeBody,
      fontWeight: fontWeight ?? FontWeight.normal,
      color: color ?? textPrimary,
      height: 1.4,
    );
  }
  
  // 应用图标路径
  static const String appIconPath = 'assets/icons/app_icon.png';
  static const String splashIconPath = 'assets/icons/splash_icon.png';
  
  // 默认头像和占位图
  static const String defaultAvatarPath = 'assets/images/default_avatar.png';
  static const String placeholderImagePath = 'assets/images/placeholder.png';
  
  // 社交媒体链接
  static const String websiteUrl = 'https://gamewiki.pro';
  static const String githubUrl = 'https://github.com/gamewiki-pro';
  static const String twitterUrl = 'https://twitter.com/gamewiki_pro';
  static const String discordUrl = 'https://discord.gg/gamewiki';
  
  // 法律信息
  static const String privacyPolicyUrl = 'https://gamewiki.pro/privacy';
  static const String termsOfServiceUrl = 'https://gamewiki.pro/terms';
  static const String supportEmail = 'support@gamewiki.pro';
  
  // 应用商店链接
  static const String playStoreUrl = 'https://play.google.com/store/apps/details?id=com.gamewiki.pro';
  static const String appStoreUrl = 'https://apps.apple.com/app/gamewiki-pro/id123456789';
}